<?php
	if(isset($system_message))echo $system_message;
	echo form_open('');
?>

<?=panel_head('<i class="fa fa-tag"></i>&nbsp; Change Your Current Academic School Year')?>

<br>
<div class="table-responsive">
	<table class="table">
		<tr class="success" >
			<td><strong> Current School Year Set </strong></td>
			<?if($current):?>
				<td><strong><a class="btn btn-success"><?=$current->sy_from?></a> - <a class="btn btn-success"><?=$current->sy_to?></a></strong></td>
				<td><strong><?=($current->desc)?'<i class="fa fa-hand-o-right"></i>&nbsp;'.$current->desc:''?></strong></td>
			<?else:?>
				<td>Either No system current School Year set by the admin or no School Year created yet.</td>
			<?endif?>
		</tr>
	</table>
</div>

<?form_open('');?>
<div class="table-responsive">
	<table class="table table-hover table-bordered">
		<tr>
			<td>School Year</td>
			<td>Description</td>
			<td>Select</td>
		</tr>
		<?if($school_years):?>

			<?foreach ($school_years as $k => $sy):?>
				
				<tr>
					<td><?=$sy->sy_from?> - <?=$sy->sy_to?></td>
					<td><?=$sy->desc ? $sy->desc : '--No Description--'?></td>
					<td>
						<input type="radio" name="sy" value="<?=$sy->id?>" />
					</td>
				</tr>

			<?endforeach;?>

		<?else:?>
			<tr>
				<td colspan="3"><p>No School Year Created Yet.</p></td>
			</tr>
		<?endif;?>
	</table>
	<button class="btn btn-primary pull-right" name="change_sy" value="change_sy" type="submit" ><i class="fa fa-save"></i>&nbsp; Change School Year</button>
</div>
<?=form_close();?>

<?=panel_tail();?>

<?=form_close()?>